#include "StdAfx.h"
#include "MapGrid.h"

void CMapGrid::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{	
		// storing code
		ar << m_bStart << m_bEnd << m_GridIndex << m_GridType << m_ObjectId;
		ar << m_GridPath[PATH_ZFX] << m_GridPath[PATH_FFX] << m_GridPath[PATH_ZGFX] << m_GridPath[PATH_FGFX];
	}
	else
	{	
		// loading code
		ar >> m_bStart >> m_bEnd >> m_GridIndex >> (int&)m_GridType >> m_ObjectId;
		ar >> m_GridPath[PATH_ZFX] >> m_GridPath[PATH_FFX] >> m_GridPath[PATH_ZGFX] >> m_GridPath[PATH_FGFX];
	}
}
